# -*- coding: utf-8 -*-
# @Date   : 2020/3/27
# @File   : R1EntEnforce.py
# @Author : zhaochen
'''eof
name:目标企业一度关联企业5年被执行数量
code:R1EntEnforce
tableName:
columnName:
groups:关联方
dependencies:EG_BBD
type:常用指标
dataSourceType:在线指标
description:
eof'''

import sys

reload(sys)
sys.setdefaultencoding('utf-8')


def float_check(num):
    try:
        float(num)
        return True
    except:
        return False


def R1EntEnforce():
    try:
        R1EntEnforce = EG_BBD["R1EntEnforce"]
        if float_check(R1EntEnforce):
            return R1EntEnforce
        elif R1EntEnforce == '':
            return 0
        else:
            return u'缺失值'
    except:
        return u'缺失值'

result = R1EntEnforce()
